<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>广告图管理</title>
  <link rel="stylesheet" href="./css/advertise/adverPic.css">
  <!-- <link rel="stylesheet" href="./css/advertise/advertise.css"> -->
  <link rel="stylesheet" href="./lib/layui/css/layui.css">
  <link rel="stylesheet" href="./adver-font/iconfont.css">
  <script src="./js/axios.js"></script>
</head>

<body>
  <div class="layui-card">
    <!-- <div class="layui-card-header">广告图管理</div> -->
    <div class="layui-card-body">
      <!-- 头部表单部分 -->
      <form class="layui-form" action="" id="formpic">
        <div class="layui-form-item input-text">
          <label class="layui-form-label label-text"> <strong>广告图描述</strong> </label>
          <div class="layui-input-block">
            <input type="text" name="advposname" required lay-verify="required" placeholder="请输入广告位名称"
              autocomplete="off" class="layui-input ">
          </div>
        </div>
        <div class="layui-form-item" style="margin-right: 20px;">
          <label class="layui-form-label"><strong>广告图位置</strong></label>
          <div class="layui-input-block">
            <select name="sex" lay-verify="required" class="layui-form" id="select">
              <option value="">请选择广告位</option>
              <!-- <option value="0">男</option>
              <option value="1">女</option> -->
            </select>
          </div>
        </div>
        <button class="layui-btn  layui-btn-normal layui-btn-sm" id="searchFrom"><i
            class="layui-icon layui-icon-search"></i>
          搜索</button>
        <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm" id="chongzhi"><i
            class="layui-icon layui-icon-refresh"></i>重置</button>
      </form>

      <!--头部新增 action-box -->
      <div class="action-box">

        <!-- 左侧新增导出按钮 -->
        <div class="headerLeft">
          <button class="add">+新增</button>
          <button class="daochu"><i class="layui-icon layui-icon-download-circle"> </i>导出</button>
        </div>


        <!-- 右侧按钮 -->
        <div class="rightHeader">
          <div class="Rightbt"> <i class="iconfont icon-arrow-up-bold"> </i> </div>
          <div class="Rightbt"> <i class="iconfont icon-shuaxin"> </i> </div>
          <div class="Rightbt"> <i class="iconfont icon-modular"> </i> </div>
        </div>
      </div>

      <!--表格渲染部分  -->
      <table class="layui-table">
        <colgroup>
          <col width="25">
          <col>
          <col>
          <col>
          <col>
        </colgroup>
        <thead>
          <tr>
            <th><strong>#</strong></th>
            <th> <strong> 广告图位</strong></th>
            <th> <strong> 广告图描述</strong></th>
            <th> <strong> 广告图</strong></th>
            <th> <strong> 广告图链接</strong></th>
            <th> <strong> 操作</strong></th>
          </tr>
        </thead>
        <tbody class="adp">
          <!-- <tr>
            <td>222</td>
            <td>人生</td>
            <td>人生就像是一场修行</td>
            <td>556</td>
            <td>人生就像是一场修行</td>
            <td>
              <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="xiugai">
                <i class="layui-icon">&#xe642;</i>
              </button>
              <button type="button" class="layui-btn  layui-btn-danger layui-btn-sm " id="shangchu">
                <i class="layui-icon">&#xe640;</i>
              </button>
            </td>
          </tr> -->
        </tbody>
      </table>

      <!-- 分页盒子 -->
      <div id="page-box"></div>
    </div>
  </div>




  <!-- 新增模块弹出层 -->
  <script type="text/html" id="tplAddCate">
    <div class="layui-form" id="addCateForm" lay-filter="addCateForm">
      <form action="" id="addAdv">
       <div class="layui-form-item" style="margin: 20px 100px 20px 0;">
        <label class="layui-form-label">广告图位：</label>
        <div class="layui-input-block" id="select2">
          <select name="advposname" lay-verify="required" id="select3">
            <!-- <option value="">请选择广告位</option>
            <option value="0">首页小广告位</option>
            <option value="1">详情页广告1</option>
            <option value="1">详情页广告2</option>
            <option value="1">首页banner</option> -->
          </select>
        </div>
       </div>
      <div class="layui-form-item">
          <label class="layui-form-label">广告图描述:</label>
          <div class="layui-input-inline" style="width: 650px;">
            <textarea name="advimgdesc" required lay-verify="required" placeholder="请输入广告图描述" class="layui-textarea"></textarea>
          </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">广告图链接:</label>
        <div class="layui-input-inline">
          <input style="margin-top: 4px; width: 650px;" type="text" name="advimglink" required  lay-verify="required" placeholder="请输入广告图链接" autocomplete="off" class="layui-input">
        </div>
      </div>
    
        <div class="layui-form-item">
          <label class="layui-form-label">广告图:</label>
          <div class="layui-input-inline" style="position: relative;">
          <button type="button" class="layui-btn  layui-btn-normal" id="addBtn">上传图片</button>
           <input type="file" id="file" name="file" style="display: block;">
          </div>
        </div>
      
      <div class="inimg" id="show"></div>

      <div class="layui-form-item" style="margin: 80px 30px 0 0; float: right;">
            <div class="layui-input-block">
                <button class="layui-btn  layui-btn-normal" lay-submit type="submit" id="setAdv" >确定</button>
                <button type="reset" class="layui-btn layui-btn-primary">取消</button>
            </div>
        </div>
      </form>
      </div>
</script>


  <!-- 修改类别弹框模板 -->
  <!-- <script type="text/html" id="tplEditCate">
  给form表单设置lay-filter属性，实现快速赋值
  <div class="layui-form" id="editCateForm" lay-filter="editCateForm">
    <input type="text" name="id" hidden />
    <div class="layui-form-item" style="margin-top: 30px;">
      <label class="layui-form-label">广告图描述:</label>
      <div class="layui-input-block" style="width: 350px;">
        <textarea name="advimgdesc" required lay-verify="required" placeholder="请输入" class="layui-textarea"></textarea>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">广告图链接:</label>
      <div class="layui-input-inline">
        <input style="margin-top: 4px;" type="text" name="advimglink" required lay-verify="required" placeholder=""
          autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">广告图位:</label>
      <div class="layui-input-inline">
        <input style="margin-top: 4px;" type="text" name="advimgpos" required lay-verify="required" placeholder=""
          autocomplete="off" class="layui-input">
      </div>
    </div>
    <form action="" id="editAdvForm">
      <div class="layui-form-item">
        <label class="layui-form-label">广告图:</label>
        <div class="layui-input-inline">
          <button type="button" class="layui-btn  layui-btn-normal" onclick="file.click()">上传图片</button>
          <input style="margin-top: 4px; display: none;" id="fileEdit" type="file" name="file" required
            lay-verify="required" placeholder="" autocomplete="off" class="layui-input" onchange="uploadFile()">
        </div>
      </div>
    </form>
    <div class="inimg" id="showEdit"></div>
    <div class="layui-form-item">
      <div class="layui-input-block" style="margin:80px 20px 0 0 ; float: right;">
        <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="formDemo" id="editAdv">立即提交</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
      </div>
    </div>
  </div>
  </script> -->


  <script src="./lib/layui/layui.all.js"></script>
  <script src="./js/jquery.min.js"></script>
  <script src="./js/advertise/baseAPI.js"></script>
  <script src="./js/advertise/adverPic.js"></script>
</body>

</html>